<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page import="java.io.IOException" %>
    <%@page import="java.sql.Connection" %>
    <%@page import="java.sql.ResultSet" %>
    <%@page import="javax.servlet.ServletException" %>
<%@page import="java.sql.DriverManager" %>
	<%
	out.println("<div class='container'>");
	out.println("<div class='col-md-8 col-md-offset-2'>");
	
	out.println("<h1>");
	out.println("企业列表");
	out.println("</h1>");
	
	out.println("<br>");
	out.println("<table class='table'>");
	out.println("	<thead>");
	
	out.println("<td>");
	out.println("id");
	out.println("</td>");
	
	out.println("<td>");
	out.println("姓名");
	out.println("</td>");
	
	out.println("<td>");
	out.println("密码");
	out.println("</td>");
	
	

	
	out.println("<td>");
	out.println("操作");
	out.println("</td>");
	
	out.println("</thead>");
	out.println("	<button class='btn btn-success' onclick='window.location.href=a.jsp'>");
	out.println("点击返回上一界面");
	out.println("</button>");
	out.println("</div>");
	out.println("</div>");
	%>
<%
try {

	Class.forName("com.mysql.cj.jdbc.Driver");
	Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/yj?autoReconnect=true&serverTimezone=GMT","root","root");
	java.sql.Statement stm=con.createStatement();
	ResultSet res=stm.executeQuery("select * from qy");
	while(res.next()){
		
		
		
		out.println("	<thead>");
		out.println("	<td>");
		out.println(res.getString("qyid"));
		out.println("	</td>");
		
		out.println("	<td>");										//显示未处理的申请
		out.println(res.getString("name"));
		out.println("	</td>");
		
		out.println("	<td>");
		out.println(res.getString("psw"));
		out.println("	</td>");
		
	
		
		out.println("<td>");
		out.print("<button class='btn btn-success' onclick="+"window.location.href='shanchu_qy.jsp?id="+res.getString("qyid")+"'>");		
		out.println("删除");
		out.println("</button>");
		out.println("</div>");
		out.println("</div>");
		out.println("</td>");
		//out.println("<td><button class='btn btn-success' onclick="+"window.location.href='foujue.jsp?id="+i+"'>");
		/*
		out.println("否决调度");
		out.println("</button>");
		out.println("</div>");
		out.println("</div>");
		out.println("</td>");
		out.println("</thead>");*/
	}			
	stm.close();
	con.close();out.println("</table>");
			
		}catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		
%>
<html>
	<head>
		<meta charset="utf-8">
		<title>管理员管理系统</title>
		<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
	</head>

	<body style="padding-top: 20px;">
	
	</body>

</html>
